package main

import (
	"fmt"
	"os"
)

func main() {
	cases := []struct {
		name string
		age  int
	}{
		{"a", 1},
		{"b", 2},
		{"c", 3},
		{"d", 4},
		{"e", 5},
		{"f", 6},
	}
	f, err := os.Create("./output/test.csv")
	defer f.Close()
	f.Sync()
	if err != nil {
		fmt.Println(err)
	}
	for _, c := range cases {
		f.WriteString(fmt.Sprintf("%s,%d\n", c.name, c.age))
	}
	fmt.Println("success>>>")

}
